<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/2
 * Time: 22:22
 */

$data = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://api.taoesoft.com/Api.aspx");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$return = curl_exec($ch);
//file_put_contents("return2.txt", "店铺：$taobao 授权码：$session 订单号：$orderId " . $return . "\r\n", FILE_APPEND);
curl_close($ch);
$return = json_decode($return, true);


function getSign()
{
    $time = intval(time() / 60);
    $key = '1b46af52a8dcaa822b98b1be9d447bb2';
    return base64_encode(md5(md5($time . $key)));
}

